package com.customers.dao;

import com.customers.entity.Customer;
import com.customers.entity.MainForm;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface CustomerDao {
    /**
     * 客户表单的dao操作
     */
    public  void editFormSave(MainForm form,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public  void deleteCustomer(MainForm form,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public  void formOperate(MainForm form,String customerSql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public  List<MainForm> searchAllCustomer(String sql) throws SQLException;
    public  List<MainForm> searchByName(String name,String sql) throws SQLException;
    public  Integer searchIdByName(MainForm form,String getIdSql) throws SQLException;
    /**
     * 联系人表单的dao操作
     */

    public  void addOperate(List<Customer> customers, Integer id,String contactSql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public  void editContactSave(Customer form,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;
    public  List<Customer> searchById(Integer id,String sql) throws SQLException;
    public  int searchIdByName(String name);
    public  void deleteContact(Customer customer,String sql) throws SQLException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;



}
